package com.mosai.alignpro.entity;

import android.util.Log;

import java.util.List;

/**
 * Created by Rays on 2020/3/9.
 */
public class Point {
    private float x; // 当前x坐标
    private float y; // 当前y坐标
    private float originX; // 原始x坐标
    private float originY; // 原始y坐标
    private float scale; // 缩放值
    private int color; // 颜色
    private int dashCircleColor; // 虚线圈颜色
    private Angle angle;
    private List<Angle> angles;
    private boolean isTemp;
    private RemoveAngleInfo removeAngleInfo;

    public Point(float x, float y) {
        this(x, y, null);
    }

    public Point(float x, float y, Angle angle) {
        this.x = x;
        this.y = y;
        this.angle = angle;
    }

    public Point(List<Float> data, float scale, int color, int dashCircleColor, Angle angle) {
        this.originX = data.get(0);
        this.originY = data.get(1);
        this.setScale(scale);
        this.color = color;
        this.dashCircleColor = dashCircleColor;
        this.angle = angle;

        Log.i("Point", "Point: " + toString());
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public float getOriginX() {
        return originX;
    }

    public void setOriginX(float originX) {
        this.originX = originX;
    }

    public float getOriginY() {
        return originY;
    }

    public void setOriginY(float originY) {
        this.originY = originY;
    }

    public float getScale() {
        return scale;
    }

    public void setScale(float scale) {
        this.scale = scale;
        this.x = this.originX * scale;
        this.y = this.originY * scale;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public int getDashCircleColor() {
        return dashCircleColor;
    }

    public void setDashCircleColor(int dashCircleColor) {
        this.dashCircleColor = dashCircleColor;
    }

    public Angle getAngle() {
        return angle;
    }

    public void setAngle(Angle angle) {
        this.angle = angle;
    }

    public boolean isTemp() {
        return isTemp;
    }

    public void setTemp(boolean temp) {
        isTemp = temp;
    }

    public List<Angle> getAngles() {
        return angles;
    }

    public void setAngles(List<Angle> angles) {
        this.angles = angles;
    }

    public RemoveAngleInfo getRemoveAngleInfo() {
        return removeAngleInfo;
    }

    public void setRemoveAngleInfo(RemoveAngleInfo removeAngleInfo) {
        this.removeAngleInfo = removeAngleInfo;
    }

    @Override
    public String toString() {
        return "Point{" +
                "x=" + x +
                ", y=" + y +
                ", originX=" + originX +
                ", originY=" + originY +
                ", scale=" + scale +
                ", color=" + color +
                ", angle=" + angle +
                '}';
    }
}
